package edu.nf.controller.room;

import edu.nf.controller.BaseController;
import edu.nf.hotel.roomtypedao.RoomTypeDAO;
import edu.nf.hotel.roomtypedao.impl.RoomTypeDaoImpl;
import edu.nf.hotel.vo.ResultVO;
import org.nf.web.annotation.RequestMapping;
import org.nf.web.annotation.RequestParam;
import org.nf.web.servlet.view.JsonView;
import org.nf.web.servlet.View;


/**
 * @Data 2023-06-25
 * @Author Lsw
 */
public class DeleteRoomTypeController extends BaseController {
    @RequestMapping("/deleteRoomType")
    public View delete(@RequestParam("roomTypeId") int roomTypeId) {

        RoomTypeDAO roomTypeDAO = new RoomTypeDaoImpl();
        roomTypeDAO.delete(roomTypeId);

        ResultVO vo = success(roomTypeDAO);
        vo.setMessage("删除成功");
        vo.setCode(200);
       return new JsonView(vo);

    }
}
